package cn.teud.quwanstore.controller;

import org.springframework.web.bind.annotation.RestController;

@RestController
public class BannerController {
    /*@Value("${dirPath}")
    private String dirPath;

    @Autowired(required = false)
    BannerMapper mapper;

    @RequestMapping("/banner/select")
    public List<Banner> select() {
        return mapper.select();
    }

    @RequestMapping("/banner/delete")
    public void delete(int id) {
        String url = mapper.selectUrlById(id);
        new File(dirPath + url).delete();
        mapper.deleteById(id);
    }

    @RequestMapping("/banner/insert")
    public void insert(String url) {
        mapper.insert(url);
    }

    @RequestMapping("/banner/update")
    public void update(@RequestBody Banner banner) {
        System.out.println("banner = " + banner);
        mapper.update(banner);
    }*/
}
